-- GENERATED SPELL FOR [Mekgineer Steamrigger] --


function spell0_17796(pUnit, Event) --@Electrified Net,n/a--
pUnit:FullCastSpellOnTarget(35107,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17796', 6500, 1)
end

function spell1_17796(pUnit, Event) --@Saw Blade,n/a--
pUnit:FullCastSpellOnTarget(31486,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17796', 250, 1)
end

function spell2_17796(pUnit, Event) --@Super Shrink Ray,n/a--
pUnit:FullCastSpellOnTarget(31485,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17796', 15358, 1)
end

function Sorts_17796(pUnit, Event)
local choix_sorts_17796 = math.random(0, 2)
if choix_sorts_17796 == 0 then
pUnit:RegisterEvent('spell0_17796', 1, 1)
end
if choix_sorts_17796 == 1 then
pUnit:RegisterEvent('spell1_17796', 1, 1)
end
if choix_sorts_17796 == 2 then
pUnit:RegisterEvent('spell2_17796', 1, 1)
end
end

function mob17796_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17796', math.random(1500, 3000), 1)
end

function mob17796_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17796_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17796_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17796, 1, 'mob17796_Action')
RegisterUnitEvent(17796, 2, 'mob17796_Leave')
RegisterUnitEvent(17796, 3, 'mob17796_Kill')
RegisterUnitEvent(17796, 4, 'mob17796_Die')
